package com.niiwoo.civet.scheduler.trigger;

import com.alibaba.dubbo.config.annotation.Reference;
import com.niiwoo.civet.account.service.AccountFundsFreezeDubboService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 资金冻结定时任务
 * Created by Jaylin on 2018/5/9.
 */
@Component
@Slf4j
public class FundsFreezeJobTrigger {

    @Reference(version = "1.0.0")
    private AccountFundsFreezeDubboService fundsFreezeDubboService;

    @Scheduled(cron = "${freezeorder.freeze-process-check}")
    public void freezeOrderProcessingJob(){
        fundsFreezeDubboService.jobProcessingFreezeOrder();
    }

    @Scheduled(cron = "${freezeorder.unfreeze-process-check}")
    public void unFreezeOrderProcessingJob(){
        fundsFreezeDubboService.jobProcessingUnfreezeOrder();
    }
}
